Variable magnetic field-based position

ABSTRACT

To derive three dimensional (3D) position and orientation of a 3-axis (or more) magnetometer/accelerometer device (such as may be implemented in VR or AR headset or computer game controller) without line of sight constraints, a spinning magnetic field is used to discriminate and remove the external (Earth&#39;s) magnetic field from the spinning magnetic field. This reduces the problem to finding the distance to the source of the magnetic field using a calibration table (or formula), finding two angles describing the deviation of the magnetic sensor from the axis of rotation of the spinning magnetic field and the phase around this axis, and from these values deriving the orientation of the sensor.

FIELD

The application relates to technically inventive, non-routine solutionsthat are necessarily rooted in computer technology and that produceconcrete technical improvements.

BACKGROUND

Knowing the “pose” (location and orientation) of various objects can beuseful in many computer applications. As but one example, computer gamessuch as virtual reality (VR) or augmented reality (AR) games aresometimes designed to receive, as input, pose information from a VR/ARheadset worn by a player, or pose information of a hand-held device suchas a computer game handset.

Current positioning solutions sometimes rely on visual tracking ofobjects with a video camera or laser beam to track the pose of objectsof interest. These technologies require sensor device to be within lineof sight of the object for light to be able to travel towards devicewithout meeting obstacles.

SUMMARY

As understood herein, the line of sight between the light sensor and theobject of interest may be blocked. As also understood herein, magneticfields are immune to blockages of line of sight. It is thereforedesirable to derive three dimensional (3D) position and orientation of a3-axis (or more) magnetometer/accelerometer device without line of sightconstraints. In the examples below, a rotating magnetic field such asmay be generated by spinning magnet or plural pulsed electromagnets isused to separate the external (Earth's) magnetic field and the generatedmagnetic field and reduce the problem to finding the distance to thefield source using a calibration table (or formula), finding two anglesdescribing the deviation of the magnetic sensor from the axis ofrotation of the spinning magnet and the phase around this axis, and fromthese values deriving the position of the sensor.

Accordingly, a method includes rotating a magnetic field, and using atleast one sensor near the field source, sensing magnetic field strengthduring at least one complete revolution of the magnet. The methodincludes summing plural values from the sensor over the at least onerevolution to render a sum, determining a mean of the sum, andsubtracting the mean of the sum from at least some of plural magneticfield values sensed by the sensor during at least one completerevolution of the magnet to render adjusted values. The adjusted valuesare squared to render squared adjusted values, and based on a minimumone of the squared adjusted values, a distance is determined. The methodfurther includes integrating the squared adjusted values to renderintegrated squared adjusted values and based on a maximum one of theintegrated squared adjusted values, determining at least a first angle.The distance and the at least first angle are converted to Cartesiancoordinates which are used to determine at least one aspect of a pose ofan object coupled to the field source.

Alternatively, data readings in covariance matrix are calculated and twoof the biggest (of three total) eigenvalues are used to calculate thesame values. Assuming eigenvalues are ev1, ev2, ev3, r˜ev2 andsin(gamma)˜ev1, ev2, r.

In some examples, the method includes, based on the distance and thefirst angle, determining a second angle, and converting the distance,the first angle, and the second angle to Cartesian coordinates. The atleast one aspect of the pose of the object can be input to a computerprogram such as a computer game.

In examples, the method further includes using the Cartesiancoordinates, the mean of the sum, and the Earth's gravity vector,determining the at least one aspect of the pose of the object. This canspecifically entail determining a first auxiliary vector by obtaining across product of the Earth's magnetic field and the Earth's gravityvector, and determining a second auxiliary vector by obtaining a crossproduct of the gravity vector and the first auxiliary vector. A matrixmay be constructed using the first and second auxiliary vectors and thegravity vector and used to convert the aspect of pose information from afirst reference frame to the Earth's reference frame. If desired, thegravity vector and first and second auxiliary vectors may be normalized(converted to the same units) before constructing the matrix such thatcolumns of the matrix include normalized vectors.

In non-limiting examples, the object for which pose information isderived is a headset wearable by a person, or a game controllermanipulable by a person.

In another aspect, a computer storage that is not a transitory signalincludes instructions executable by at least one processor forreceiving, from at least one sensor, plural magnetic field signalsinduced by a spinning magnetic field. The plural magnetic field signalsare from a complete rotation of the magnetic field. The instructions areexecutable for determining a distance to the magnetic field source basedon at least one of the plural magnetic field signals, determining firstand second angles based on at least one of the plural magnetic fieldsignals, and deriving an orientation of the sensor based on the distanceand the first and second angles.

In another aspect, a computer game device includes at least one magneticfield source configured for producing a rotating field and at least onesensor configured for sensing the magnetic field. The sensor isconfigured for providing input to at least one processor configured forexecuting instructions to receive, from the sensor, plural magneticfield signals. The plural magnetic field signals are from a completerotation of the magnetic field. The processor when executing theinstructions determines a distance to the magnetic field source based onat least one of the plural magnetic field signals, as well as first andsecond angles based on at least one of the plural magnetic fieldsignals. The processor when executing the instructions derives anorientation of the sensor based on the distance and the first and secondangles.

As alluded to above, a series of electro-permanent magnets may be usedinstead of a single spinning permanent magnet. The electro-permanentmagnets can be turned on and off in series to simulate a quantizedspinning magnetic field. Also magnetic background readings can be takenwhile all the electro-permanent magnets are turned off to improve thefiltering of unwanted magnetic fields.

The details of the present application, both as to s structure andoperation, can best be understood in reference to the accompanyingdrawings, in which like reference numerals refer to like parts, and inwhich:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example system including an example inaccordance with present principles;

FIG. 2 is a block diagram of example pose-sensing components of anexample object whose pose information is to be tracked;

FIGS. 3-7 are schematic diagrams of an example spinning permanent magnetillustrating aspects of the magnetic field and various variablesdiscussed in relation to the process herein;

FIG. 8 is a flow chart of example logic for determining the externalmagnetic field;

FIG. 9 is a schematic diagram of an example spinning permanent magnetillustrating aspects related to the logic of FIG. 8;

FIG. 10 is a flow chart of example logic for determining “r”, thedistance to the magnet;

FIG. 11 is a flow chart of example logic for determining the phase angleand subsequent determination of pose information;

FIG. 12 is a schematic diagram of an alternate system that usesstationary electromagnets to generate a rotating magnetic field;

FIG. 13 is a flow chart of alternate logic that uses eigenvalues from anempirically determined matrix for the maximum and minimum field values;

FIGS. 14 and 15 are flow charts of example logic that employs predictedpose information; and

FIG. 16 is a graph showing the output of the sensor when constructing acovariance matrix according to FIGS. 13-15.

DETAILED DESCRIPTION

This disclosure relates generally to computer ecosystems includingaspects of consumer electronics (CE) device networks such as but notlimited to computer game networks. A system herein may include serverand client components, connected over a network such that data may beexchanged between the client and server components. The clientcomponents may include one or more computing devices including gameconsoles such as Sony PlayStation® or a game console made by Microsoftor Nintendo or other manufacturer virtual reality (VR) headsets,augmented reality (AR) headsets, portable televisions (e.g. smart TVs,Internet-enabled TVs), portable computers such as laptops and tabletcomputers, and other mobile devices including smart phones andadditional examples discussed below. These client devices may operatewith a variety of operating environments. For example, some of theclient computers may employ, as examples, Linux operating systems,operating systems from Microsoft, or a Unix operating system, oroperating systems produced by Apple Computer or Google. These operatingenvironments may be used to execute one or more browsing programs, suchas a browser made by Microsoft or Google or Mozilla or other browserprogram that can access websites hosted by the Internet serversdiscussed below. Also, an operating environment according to presentprinciples may be used to execute one or more computer game programs.

Servers and/or gateways may include one or more processors executinginstructions that configure the servers to receive and transmit dataover a network such as the Internet. Or, a client and server can beconnected over a local intranet or a virtual private network. A serveror controller may be instantiated by a game console such as a SonyPlayStation®, a personal computer, etc.

Information may be exchanged over a network between the clients andservers. To this end and for security, servers and/or clients caninclude firewalls, load balancers, temporary storages, and proxies, andother network infrastructure for reliability and security. One or moreservers may form an apparatus that implement methods of providing asecure community such as an online social website to network members.

As used herein, instructions refer to computer-implemented steps forprocessing information in the system. Instructions can be implemented insoftware, firmware or hardware and include any type of programmed stepundertaken by components of the system.

A processor may be any conventional general purpose single- ormulti-chip processor that can execute logic by means of various linessuch as address lines, data lines, and control lines and registers andshift registers.

Software modules described by way of the flow charts and user interfacesherein can include various b-routines, procedures, etc. Without limitingthe disclosure, logic stated to be executed by a particular module canbe redistributed to other software modules and/or combined together in asingle module and/or made available in a shareable library.

Present principles described herein can be implemented as hardware,software, firmware, or combinations thereof; hence, illustrativecomponents, blocks, modules, circuits, and steps are set forth in termsof their functionality.

Further to what has been alluded to above, logical blocks, modules, andcircuits described below can be implemented or performed with a generalpurpose processor, a digital signal processor (DSP), a fieldprogrammable gate array (FPGA) or other programmable logic device suchas an application specific integrated circuit (ASIC), discrete gate ortransistor logic, discrete hardware components, or any combinationthereof designed to perform the functions described herein. A processorcan be implemented by a controller or state machine or a combination ofcomputing devices.

The functions and methods described below, when implemented in software,can be written in an appropriate language such as but not limited toJava, C# or C++, and can be stored on or transmitted through acomputer-readable storage medium such as a random access memory (RAM),read-only memory (ROM), electrically erasable programmable read-onlymemory (EEPROM), compact disk read-only memory (CD-ROM) or other opticaldisk storage such as digital versatile disc (DVD), magnetic disk storageor other magnetic storage devices including removable thumb drives, etc.A connection may establish a computer-readable medium. Such connectionscan include, as examples, hard-wired cables including fiber optics andcoaxial wires and digital subscriber line (DSL) and twisted pair wires.Such connections may include wireless communication connectionsincluding infrared and radio.

Components included in one embodiment can be used in other embodimentsin any appropriate combination. For example, any of the variouscomponents described herein and/or depicted in the Figures may becombined, interchanged or excluded from other embodiments.

“A system having at least one of A, B, and C” (likewise “a system havingat least one of A, B, or C” and “a system having at least one of A, B,C”) includes systems that have A alone, B alone, C alone, A and Btogether, A and C together, B and C together, and/or A, B, and Ctogether, etc.

Now specifically referring to FIG. 1, an example system 10 is shown,which may include one or more of the example devices mentioned above anddescribed further below in accordance with present principles. The firstof the example devices included in the system 10 is a consumerelectronics (CE) device such as an audio video device (AVD) 12 such asbut not limited to an Internet-enabled TV with a TV tuner (equivalently,set top box controlling a TV). However, the AVD 12 alternatively may bean appliance or household item, e.g. computerized Internet enabledrefrigerator, washer, or dryer. The AVD 12 alternatively may also be acomputerized Internet enabled (“smart”) telephone, a tablet computer, anotebook computer, a wearable computerized device such as e.g.computerized Internet-enabled watch, a computerized Internet-enabledbracelet, other computerized Internet-enabled devices, a computerizedInternet-enabled music player, computerized Internet-enabled headphones, a computerized Internet-enabled implantable device such as animplantable skin device, etc. Regardless, it is to be understood thatthe AVD 12 is configured to undertake present principles (e.g.communicate with other CE devices to undertake present principles,execute the logic described herein, and perform any other functionsand/or operations described herein).

Accordingly, to undertake such principles the AVD 12 can be establishedby some or all of the components shown in FIG. 1. For example, the AVD12 can include one or more displays 14 that may be implemented by a highdefinition or ultra-high definition “4K” or higher flat screen and thatmay be touch-enabled for receiving user input signals via touches on thedisplay. The AVD 12 may include one or more speakers 16 for outputtingaudio in accordance with present principles, and at least one additionalinput device 18 such as e.g. an audio receiver/microphone for e.g.entering audible commands to the AVD 12 to control the AVD 12. Theexample AVD 12 may also include one or more network interfaces 20 forcommunication over at least one network 22 such as the Internet, an WAN,an LAN, etc. under control of one or more processors 24 including. Agraphics processor 24A may also be included. Thus, the interface 20 maybe, without limitation, a Wi-Fi transceiver, which is an example of awireless computer network interface, such as but not limited to a meshnetwork transceiver. It is to be understood that the processor 24controls the AVD 12 to undertake present principles, including the otherelements of the AVD 12 described herein such as e.g. controlling thedisplay 14 to present images thereon and receiving input therefrom.Furthermore, note the network interface 20 may be, e.g., a wired orwireless modem or router, or other appropriate interface such as, e.g.,a wireless telephony transceiver, or Wi-Fi transceiver as mentionedabove, etc.

In addition to the foregoing, the AVD 12 may also include one or moreinput ports 26 such as, e.g., a high definition multimedia interface(HDMI) port or a USB port to physically connect (e.g. using a wiredconnection) to another CE device and/or a headphone port to connectheadphones to the AVD 12 for presentation of audio from the AVD 12 to auser through the headphones. For example, the input port 26 may beconnected via wire or wirelessly to a cable or satellite source 26 a ofaudio video content. Thus, the source 26 a may be, e.g., a separate orintegrated set top box, or a satellite receiver. Or, the source 26 a maybe a game console or disk player containing content that might beregarded by a user as a favorite for channel assignation purposesdescribed further below. The source 26 a when implemented as a gameconsole may include some or all of the components described below inrelation to the CE device 44.

The AVD 12 may further include one or more computer memories 28 such asdisk-based or solid state storage that are not transitory signals, insome cases embodied in the chassis of the AVD as standalone devices oras a personal video recording device (PVR) or video disk player eitherinternal or external to the chassis of the AVD for playing back AVprograms or as removable memory media. Also in some embodiments, the AVD12 can include a position or location receiver such as but not limitedto a cellphone receiver, GPS receiver and/or altimeter 30 that isconfigured to e.g. receive geographic position information from at leastone satellite or cellphone tower and provide the information to theprocessor 24 and/or determine an altitude at which the AVD 12 isdisposed in conjunction with the processor 24. However, it is to beunderstood that another suitable position receiver other than acellphone receiver, GPS receiver and/or altimeter may be used inaccordance with present principles to e.g. determine the location of theAVD 12 in e.g. all three dimensions.

Continuing the description of the AVD 12, in some embodiments the AVD 12may include one or more cameras 32 that may be, e.g., a thermal imagingcamera, a digital camera such as a webcam, and/or a camera integratedinto the AVD 12 and controllable by the processor 24 to gatherpictures/images and/or video in accordance with present principles. Alsoincluded on the AVD 12 may be a Bluetooth transceiver 34 and other NearField Communication (NFC) element 36 for communication with otherdevices using Bluetooth and/or NFC technology, respectively. An exampleNFC element can be a radio frequency identification (RFID) element,Zigbee also may be used.

Further still, the AVD 12 may include one or more auxiliary sensors 37(e.g., a motion sensor such as an accelerometer, gyroscope, cyclometer,or a magnetic sensor, an infrared (IR) sensor, an optical sensor, aspeed and/or cadence sensor, a gesture sensor (e.g. for sensing gesturecommand), etc.) providing input to the processor 24. The AVD 12 mayinclude an over-the-air TV broadcast port 38 for receiving OTA TVbroadcasts providing input to the processor 24. In addition to theforegoing, it is noted that the AVD 12 may also include an infrared (IR)transmitter and/or IR receiver and/or IR transceiver 42 such as an IRdata association (IRDA) device. A battery (not shown) may be providedfor powering the AVD 12.

Still referring to FIG. 1, in addition to the AVD 12, the system 10 mayinclude one or more other CE device types. In one example, a first CEdevice 44 may be used to send computer game audio and video to the AVD12 via commands sent directly to the AVD 12 and/or through thebelow-described server while a second CE device 46 may include similarcomponents as the first CE device 44. In the example shown, the secondCE device 46 may be configured as a VR headset worn by a player 47 asshown, or a hand-held game controller manipulated by the player 47. Inthe example shown, only two CE devices 44, 46 are shown, it beingunderstood that fewer or greater devices may be used. For example,principles below discuss multiple players 47 with respective headsetscommunicating with each other during play of a computer game sourced bya game console to one or more AVD 12, as an example of a multiuser voicechat system.

In the example shown, to illustrate present principles all three devices12, 44, 46 are assumed to be members of an entertainment network in,e.g., a home, or at least to be present in proximity to each other in alocation such as a house. However, present principles are not limited toa particular location, illustrated by dashed lines 48, unless explicitlyclaimed otherwise.

The example non-limiting first CE device 44 may be established by anyone of the above-mentioned devices, for example, a portable wirelesslaptop computer or notebook computer or game controller (also referredto as “console”), and accordingly may have one or more of the componentsdescribed below. The first CE device 44 may be a remote control (RC)for, e.g., issuing AV play and pause commands to the AVD 12, or it maybe a more sophisticated device such as a tablet computer, a gamecontroller communicating via wired or wireless link with the AVD 12, apersonal computer, a wireless telephone, etc.

Accordingly, the first CE device 44 may include one or more displays 50that may be touch-enabled for receiving user input signals via toucheson the display. The first CE device 44 may include one or more speakers52 for outputting audio in accordance with present principles, and atleast one additional input device 54 such as e.g. an audioreceiver/microphone for e.g. entering audible commands to the first CEdevice 44 to control the device 44. The example first CE device 44 mayalso include one or more network interfaces 56 for communication overthe network 22 under control of one or more CE device processors 58. Agraphics processor 58A may also be included. Thus, the interface 56 maybe, without limitation, a Wi-Fi transceiver, which is an example of awireless computer network interface, including mesh network interfaces.It is to be understood that the processor 58 controls the first CEdevice 44 to undertake present principles, including the other elementsof the first CE device 44 described herein such as e.g. controlling thedisplay 50 to present images thereon and receiving input therefrom.Furthermore, note the network interface 56 may be, e.g., a wired orwireless modem or router, or other appropriate interface such as, e.g.,a wireless telephony transceiver, or Wi-Fi transceiver as mentionedabove, etc.

In addition to the foregoing, the first CE device 44 may also includeone or more input ports 60 such as, e.g., a HDMI port or a USB port tophysically connect (e.g. using a wired connection) to another CE deviceand/or a headphone port to connect headphones to the first CE device 44for presentation of audio from the first CE device 44 to a user throughthe headphones. The first CE device 44 may further include one or moretangible computer readable storage medium 62 such as disk-based or solidstate storage. Also in some embodiments, the first CE device 44 caninclude a position or location receiver such as but not limited to acellphone and/or GPS receiver and/or altimeter 64 that is configured toe.g. receive geographic position information from at least one satelliteand/or cell tower, using triangulation, and provide the information tothe CE device processor 58 and/or determine an altitude at which thefirst CE device 44 is disposed in conjunction with the CE deviceprocessor 58. However, it is to be understood that another suitableposition receiver other than a cellphone and/or GPS receiver and/oraltimeter may be used in accordance with present principles to e.g.determine the location of the first CE device 44 in e.g. all threedimensions.

Continuing the description of the first CE device 44, in someembodiments the first CE device 44 may include one or more cameras 66that may be, e.g., a thermal imaging camera, a digital camera such as awebcam, and/or a camera integrated into the first CE device 44 andcontrollable by the CE device processor 58 to gather pictures/imagesand/or video in accordance with present principles. Also included on thefirst CE device 44 may be a Bluetooth transceiver 68 and other NearField Communication (NFC) element 70 for communication with otherdevices using Bluetooth and/or NFC technology, respectively. An exampleNFC element can be a radio frequency identification (RFID) element.

Further still, the first CE device 44 may include one or more auxiliarysensors 72 (e.g., a motion sensor such as an accelerometer, gyroscope,cyclometer, or a magnetic sensor, an infrared (IR) sensor, an opticalsensor, a speed and/or cadence sensor, a gesture sensor (e.g. forsensing gesture command), etc.) providing input to the CE deviceprocessor 58. The first CE device 44 may include still other sensorssuch as e.g. one or more climate sensors 74 (e.g. barometers, humiditysensors, wind sensors, light sensors, temperature sensors, etc.) and/orone or more biometric sensors 76 providing input to the CE deviceprocessor 58. In addition to the foregoing, it is noted that in someembodiments the first CE device 44 may also include an infrared (IR)transmitter and/or IR receiver and/or IR transceiver 78 such as an IRdata association (IRDA) device. A battery (not shown) may be providedfor powering the first GE device 44. The CE device 44 may communicatewith the AVD 12 through any of the above-described communication modesand related components.

The second CE device 46 may include some or all of the components shownfor the CE device 44. Either one or both CE devices may be powered byone or more batteries.

Now in reference to the afore-mentioned at least one server 80, itincludes at least one server processor 82, at least one tangiblecomputer readable storage medium 84 such as disk-based or solid statestorage, and at least one network interface 86 that, under control ofthe server processor 82, allows for communication with the other devicesof FIG. 1 over the network 22, and indeed may facilitate communicationbetween servers and client devices in accordance with presentprinciples. Note that the network interface 86 may be, e.g., a wired orwireless modem or router, Wi-Fi transceiver, or other appropriateinterface such as, e.g., a wireless telephony transceiver.

Accordingly, in some embodiments the server 80 may be an Internet serveror an entire server “farm”, and may include and perform “cloud”functions such that the devices of the system 10 may access a “cloud”environment via the server 80 in example embodiments for, e.g., networkgaming applications. Or, the server 80 may be implemented by one or moregame consoles or other computers in the same room as the other devicesshown in FIG. 1 or nearby.

The methods herein may be implemented as software instructions executedby a processor, suitably configured Advanced RISC Machine (ARM)microcontroller, an application specific integrated circuits (ASIC) orfield programmable gate array (FPGA) modules, or any other convenientmanner as would be appreciated by those skilled in those art. Forexample, a real time operating system (RTOS) microcontroller may be usedin conjunction with Linus or Windows-based computers via USB layers.Where employed, the software instructions may be embodied in anon-transitory device such as a CD ROM or Flash drive. The software codeinstructions may alternatively be embodied in a transitory arrangementsuch as a radio or optical signal, or via a download over the internet.

In general, present principles use a magnetic field map to determineand/or predict magnetic sensor position and orientation with respect toa magnetic field source. An external magnetic dipole-like magnetic fieldmay be used to determine position and orientation of a 9-axis sensor. Inthe discussion below, the magnetic dipole field is described by thefollowing equation:

${\overset{\rightharpoonup}{B} = {\frac{\overset{\rightharpoonup}{m}}{{r}^{3}}\left( {{3\frac{\left( {\overset{\rightharpoonup}{m},\overset{\rightharpoonup}{r}} \right)\overset{\rightharpoonup}{r}}{{r}^{5}}} - \frac{\overset{\rightharpoonup}{m}}{{r}^{3}}} \right)}},$where

resultant magnetic field at point at the end of the vector {right arrowover (r)}, with the magnet's magnetic moment being

.

FIG. 2 shows an example assembly 200 that may be incorporated into anobject such as but not limited the object 47 in FIG. 1, e.g., a VR/ARheadset or a hand-held computer game controller, to determine poseinformation related to the object and to send that pose information to,e.g., a computer game as input to the game. “Pose information” typicallycan include location in space and orientation in space.

When the assembly 200 is incorporated into a headset, it may include aheadset display 202 for presenting demanded images, e.g., computer gameimages. The assembly 200 may also include an accelerometer 204 withthree sub-units, one each for determining acceleration in the x, y, andz axes in Cartesian coordinates. A gyroscope 206 may also be includedto, e.g., detect changes in orientation over time to track all threerotational degrees of freedom. While the assembly 200 may exclude theaccelerometer 204 (and/or gyroscope 206) and rely only on thebelow-described magnetometer 208, the accelerometer 204 (and/orgyroscope 206) may be retained as it is very fast compared to themagnetometer. Retaining these sensors further can be used as describedfurther below to improve performance and precision using sensor fusion.

The magnetometer 208 typically includes a magnetic field sensor. Inaddition to in lieu of a magnetometer sensor per se, the sensor may beimplemented by a Hall effect sensor or other appropriate magnetic fieldsensor. However the sensor is physically embodied, it measures themagnetic field generated by a spinning permanent magnet 210 such as ahorseshoe-shaped, bar-shaped, or other appropriately shaped magnetimplemented by Iron or a rare earth material such as Neodymium. Forexample, the magnet 210 may be made of neodymium iron boron (NdFeB), orsamarium cobalt (SmCo), or alnico, or ceramic, or ferrite.

To spin the magnet 210 about an axis, a motor 212 is coupled to themagnet. A processor 214 accessing instructions on a computer memory 216may receive signals from the magnetometer 208, accelerometer 204, andgyroscope 206 and may control the motor 212 and display 202 or feed posedata to different consumers, e.g., partner garners. The processor 214may execute the logic below to determine aspects of pose informationusing the signals from the magnetometer and may also communicate withanother computer such as but not limited to a computer game consoleusing any of the wired or wireless transceivers shown in FIG. 1 anddescribed above, including communication of the pose information to theother computer. In some embodiments the data from the magnetometer maybe uploaded to a remote processor that executes the logic below.

FIG. 3 shows a horseshoe-shaped embodiment of the magnet 210, with anorth pole 300 and a south pole 302 and a magnetic field 304 between thepoles. FIG. 3 shows an example in which the magnetic field is 304 issymmetric, i.e., the magnetic field exhibits plane symmetry. In the casewhen magnetic field is symmetric it is in addition possible to directlyobtain the external magnetic field by simply integrating magnetometerreadings. Alternatively, sensor fusion can be used in order to getexternal magnetic field. In the last case magnetic field empiricformulas are used in order to match measured versus calculated sensorreadings. Because the magnetic field is concentrated near the magnetpoles, and even in the case of a strong neodymium magnet the fielddecays relatively rapidly with distance from the poles, if desired oneor more magnetic conductors may be used to expand the magnetic field andmake it less concentrated near the poles.

As mentioned above, that strict symmetry isn't required. Whileadvantageous, since it is possible when symmetry is present to obtainthe external magnetic field explicitly by just integration, in the caseof an asymmetric field it is still possible to obtain the external fieldby applying sensor fusion as described more fully below and having theexternal field as system state variables.

FIG. 4 shows the magnet in a bar-shaped embodiment 400 which is spun, inthe example shown in the horizontal plane, in the direction of the arrow402 by the motor 212, a central shaft or axle 404 of which is coupled tothe magnet 400. In FIG. 4, various parameters discussed further beloware illustrated. The three Cartesian axes are shown, and the vector “r”mentioned above is illustrated. The magnet's magnetic moment vector

also is shown. The magnet's orientation angle α describing theorientation in X-Y plane of magnetic moment vector

(defined by the south-north magnet's axis direction) and the x-axis alsois shown. In FIG. 4, the magnet 400 is laying in (X, Y) plane. Theobservation point at which the magnetic field is sensed is described bythe distance of the observation point from the origin (given by thevector r) and angle γ by which the vector r is offset from the z-axis.Without restricting the generality it is assumed in the formulas belowthat the observation point is within the Y-Z plane.

The magnetic field at the end of the vector r is given by:

$\overset{\rightharpoonup}{B} = {\frac{m}{r^{3}}{\left( {{3\;{\sin(\alpha)}{{\sin(\gamma)}\begin{bmatrix}0 \\{\sin(\gamma)} \\{\cos(\gamma)}\end{bmatrix}}} - \begin{bmatrix}{\cos(\alpha)} \\{\sin(\alpha)} \\0\end{bmatrix}} \right).}}$

As described further below, the magnet performs one complete revolutionaround the z-axis and the integral of

over one revolution is obtained as follows:

${\int_{0}^{360}\overset{\rightharpoonup}{B}} = {{\int_{0}^{360}{\frac{m}{r^{3}}\left( {{3\;{\sin(\alpha)}{{\sin(\gamma)}\begin{bmatrix}0 \\{\sin(\gamma)} \\{\cos(\gamma)}\end{bmatrix}}} - \begin{bmatrix}{\cos(\alpha)} \\{\sin(\alpha)} \\0\end{bmatrix}} \right)d\;\alpha}} = {\begin{bmatrix}0 \\0 \\0\end{bmatrix}.}}$

In other words, by summing up all magnetic field values over onecomplete revolution, the sum should equal zero if the only magneticfield being sensed were generated entirely by the magnet, when inreality part of the sensed field is the Earth's magnetic field. Thismeans that by summing up all real word field values over one revolutionof the magnet, it is possible to cancel out magnet's field and get onlyexternal magnetic field value by obtaining the mean of the result asdescribed further below.

However, before describing further details of operation, additionalillustration of the spinning magnet is shown in FIGS. 5 and 6, showingthe spinning magnet 210 with its spin axis 600 (about which the arrow500 extends) coinciding with the intersection of the symmetry planes602, 604 of the field generated by the magnet.

Further description of the result mentioned above is now provided.

FIG. 7 further illustrates the symmetry properties shown in FIGS. 5 and6. Each of two points that are symmetrical relative to the rotation axisof the magnet correspond to the magnetic field vectors 700, 702. If themagnetic sensor is located at the origin of the first vector 700, after180 degrees of rotation the second vector 702 arrow assumes the samelocation as the first vector 700 previously held because the secondvector in turn also rotated 180 degrees, becoming the same as the firstvector 700 in magnitude but opposite in direction. Because of thissymmetry, if all field values are summed up during one revolution, thesum should be the zero vector (plus any external constant magneticfield).

Turn now to FIGS. 8 and 9 for an explanation of the first step in theexample determination of pose information. Commencing at block 800 inFIG. 8, the magnet 210 shown in FIG. 9 is spun by the motor 212 asindicated by the arrow 900. Proceeding to block 802, sensor measurementsover a complete revolution of the magnet are obtained and summed. Asdiscussed above, assuming the axis of rotation of the magnet is at orrelatively close to the intersection of the symmetry planes of themagnet, this sum should produce the zero vector, meaning that the meanof a real world non-zero result represents the Earth's magnetic field.This result is obtained at block 804 of FIG. 8 by dividing the realworld non-zero result by the number of measurement samples perrevolution. Essentially, the magnetometer (or other magnetic sensor)readings over one revolution are integrated to obtain the externalmagnetic field.

For illustration purposes, FIG. 9 also shows a cylindrical coordinatesystem 902 superimposed on a Cartesian coordinate system 904 forconversion purposes to be shortly disclosed.

FIG. 10 shows that at block 1000, the external field determined at block804 of FIG. 8 is subtracted from each magnetic field reading over theentire revolution of the magnet. In an example, magnetic field readingsare sensed for every degree of rotation, so that 360 total readings areobtained for a complete revolution, it being understood that greater orfewer readings may be obtained for a revolution.

Proceeding to block 1002, the amplitude of each field reading afteradjusting for the mean field value is squared, and the minimum value (orsecond eigenvalue when used according to description below) from amongthe squares is selected to derive the distance “r” at block 1004 fromthe sensor to the magnet. This may be done by finding the appropriatepoint on a calibration value of a distance curve (or using empiricalformula, see further explanation). Since it is not expected that thereal world magnet will exactly match a magnetic dipole's model magneticfield, either interpolated table values that are empirically determinedthrough experimental measurement or an empirical formula may be used tofind “r”. For example, at block 1004 in FIG. 10, “r” may be obtainedfrom the minimum value among the measured field strengths B by settingthe minimum B=m²/r⁶. The value of “r” from block 1004 is set to be thedistance from the magnet to the sensor at block 1006.

Having obtained the distance “r”, and now referring to FIG. 11, having amapping of maximum magnetic field of (x, y) in magnet's symmetry planeonly it is possible to determine the (x, y) position in magnet'sreference frame.

At block 1100 the squares of the adjusted field values described aboveare integrated over one revolution. This step may be given by:

${\overset{\rightharpoonup}{B}}^{2} = {\frac{m^{2}}{r^{6}}\left( {{3\;{\sin^{2}(\alpha)}{\sin^{2}(\gamma)}} + 1} \right)}$

The integral over one revolution of magnetic field squared is

${\int_{0}^{360}{B^{2}d\;\alpha}} = {\frac{m^{2}}{r^{6}}{\left( {{3\;\pi\;{\sin^{2}(\gamma)}} + {2\;\pi}} \right).}}$An example way to obtain γ and α is described further below.

Moving to block 1102, the result of the integration is used to derivethe angle between the rotation axis of the magnet and the magnetometerposition vector. Assuming that

$\frac{m^{2}}{r^{6}}$value is obtained at previous step it is possible to obtain sin(γ). Morespecifically, the phase angle γ (angle defining position around magnet'srotation axis) in the equation above can be determined by choosing themagnetic field maximum value (or maximum eigenvalue of magnet readingscovariance matrix.) The angle of the magnet corresponding to this fieldvalue is the angle γ to be found.

That is, m²/r⁶ for all field values, including the maximum, is known, asis m²/r⁶ (3π(sin(γ))²+2π) is known, (3π(sin(γ)²+2π) is determined. Usingthis last equation, sin(γ) is determined and hence γ is determined.Thus, the orientation of the point of interest in the (X, Y) plane canbe obtained by tracking the magnet's rotation phase by measuring thepoint in time at which the magnetic field is maximum.

With the values of (a) m²/r and (b) sin(γ) being known, and taking intoaccount that at any point the magnetic field length squared is m²/r⁶(3(sin(γ))²(sin(α))²+1) and by substituting a) and b) into this value,sin(α) and hence α itself is obtained. The only tradeoff is whichmagnetic field value over the whole revolution to take for thecalculation, as it affects RF orientation with respect to externalreference frame. In an example, this is fixed as follows. Assuming themagnetic field's rotation axis is chosen to be horizontal, a value ofthe magnetic field may be used which is perpendicular to the directionof gravity so that the angle α is determined from the horizontaldirection.

Proceeding to block 1104, the values for “r”, γ, and α are converted toCartesian coordinates as follows:x=r sin(γ)cos(α)y=r sin(γ)sin(α)z=r cos(γ)

At block 1106 the orientation of the device containing the magnet isdetermined using the external magnetic field and the gravity vector.This is to convert the obtained coordinates from the magnet referenceframe (RF) into the real world RF.

In one example, the process may be executed twice, first to apply it tothe magnet's horizontal magnetic field (used to calculate α) and gravityand then to use the external field value and gravity vector to computethe transformation to world RF. Assuming that the matrices obtained asdescribed below are B and A, the resultant transformation is A*B⁻¹. Astransformation converts from magnet RF to sensor RF and A from sensor RFto world RF, the product converts from the magnet RF to the real worldRF:

a) Get auxiliary vector which is a3=B×g (cross product of Earth magneticfield and gravity);

b) Get another auxiliary vector a1=g×a3 (cross product of gravity andprevious auxiliary vector);

c) Normalize g, a1, and a3;

d) Compose matrix A=(a1 g a3), in which columns are a1, g and a3 arenormalized vectors.

The result A is the orientation matrix converting from sensor RF toworld RF.

Aspects of the pose information of the assembly 200 containing themagnet may then be communicated to, e.g., a computer game or otherprogram as input for altering the game (or other program) according tothe pose information of the object 200.

Understanding that the actual magnetic field of the magnet may bedifferent from an ideal dipole magnetic field, in some implementations atwo dimensional interpolation grid may be used to determine the exactposition “r”.

Furthermore, recognizing that the magnetic field decays as 1/r³ and thesquare thereof as 1/r⁶, logarithms of field values may be used insteadof field values directly, because logarithms decay slower. Thistechnique may be combined with fitting the measured field over onerevolution by regression and getting the minimum value from theregression formula such as: r˜exp(regression_expression(log(|B|)).

FIG. 12 illustrates that instead of using a spinning permanent magnet togenerate a rotating magnetic field, a device 1200 such as a VR headsetor hand-held game controller or other device may use multiple stationaryelectro-permanent magnets 1302. The series of electro-permanent magnetsmay be used instead of a single spinning permanent magnet. Theelectro-permanent magnets can be turned on and off in series to simulatea quantized spinning magnetic field. Also magnetic background readingscan be taken while all the electro-permanent magnets are turned off toimprove the filtering of unwanted magnetic fields.

FIG. 13 illustrates alternate logic that may be employed. At block 1300multiple magnetometer readings are experimentally gathered as themagnetic field rotates. This may be done as follows.

Experiments are done in the following way. A stationary magnetic sensoris exposed to a spinning magnetic field and all sensor readings areanalyzed. A typical image of the output of the sensor over a completerevolution of the magnetic field is shown in FIG. 16.

The covariance is calculated in the following way. A mean field value“B_(mean)” is calculated first. Designating A as the covariance matrixthen its Aij component is calculated in the following way:

${{Aij} = {\frac{1}{2\;\pi}{\int_{0}^{2\;\pi}{\left( {B - {Bmean}} \right){i\left( {B - {Bmean}} \right)}{jd}\;\alpha}}}},$

where “I” and “j” are subscripts denoting the respective i^(th) andj^(th) differences indicated in the integral and the magnetic fieldvalues “B” are vector values.

$A_{ij} = {\int_{0}^{2\;\pi}{\left( {\overset{\rightarrow}{B} - {\overset{\rightarrow}{B}}_{mean}} \right)_{i}\left( {\overset{\rightarrow}{B} - {\overset{\rightarrow}{B}}_{mean}} \right)_{j}d\;\alpha}}$

{right arrow over (B)} and {right arrow over (B)}_(mean) are vectorvalues and “i” and “j”=1 . . . 3 are vector component indices.

Next, the magnetic field recorded during one revolution is plotted andas shown in FIG. 16 typically has an elliptical shape. The largesteigenvalue, eigenvector corresponds to the largest dimension of magneticfield plot shape (major axis of the ellipse). A middle eigenvector,eigenvalue corresponds to the smallest dimension of that plot shape(minor axis of the ellipse). And the smallest eigenvalue, eigenvectorcorrespond to the shape's plane normal.

Thus, the ellipse-like magnetic field output graph in FIG. 16 ischaracterized by the biggest and the smallest dimensions. Both themaximum and minimum field absolute eigenvalues and the maximum andmiddle eigenvalues characterize magnetic fields figure's aspect ratioand size. Because of that it is possible to use either the minimum andmaximum absolute field values or a pair of eigenvalues. Specifically,assuming the eigenvalues are ev1, ev2, ev3, in the preceding equations,r˜ev2 and sin(γ)˜ev1, ev2, r Note that because the determination of theeigenvalues calculation, which involves all of the magnetic fieldreadings for a complete revolution of the field, a relatively precisedetermination of “r” and “gamma” can be made.

Thus, at block 1302, a covariance matrix is constructed from thereadings as described above, and at block 1304 two of the threeeigenvalues from the matrix are used for the minimum and maximum fieldvalues over one revolution of the field.

Instead of directly deriving r, γ and α, sensor fusion can be used tocontinuously improve pose belief by matching sensor readings with sensorreading predictions made using values tables or empiric formulas. FIG.14 shows that in a first aspect of this, at block 1400 predicted r,

(sin

(γ))

{circumflex over ( )}2 and

(sin

(α))

{circumflex over ( )}2 sin²(γ) and sin(α) are obtained and fused withthe same values calculated from magnetic field integration at block1402. Essentially, using what can be regarded as a basic Bayesianfilter, at each time step two substeps are executed, namely, aprediction step and a correction step. The prediction step includesmotion equations integration. In other words, having a current belief ofposition, speed, acceleration, orientation, and angular velocity, a newpose prediction is generated by, e.g., extrapolation. Then thecorrection step determines a new “pose belief”, i.e., extrapolatedvalues for what the new pose information will be, based on the predictedpose sensor readings. Then the correction step calculates sensorreadings belief based on pose estimation from prediction step. Thissensor readings “pose belief” is then compared to subsequent actualsensor readings. A pose correction is then calculated based on how muchthe sensor readings “pose belief” diverges from the actual sensorreadings. Sensor readings estimation is compared to actual sensorreadings and pose adjustment is calculated based on how much actualsensor readings diverge from estimation.

In contrast, FIG. 15 illustrates that an alternative way is to fusedirect magnetic sensor readings obtained at block 1500 with predictedsensor readings at block 1502 based on sensor current pose belief. Thatis, instead of fusing calculated distance “r” to magnetic field sourceand sin(γ) as described above, magnetic sensor readings are fuseddirectly based on current pose belief.

It is to be understood that the logic of FIG. 14 may be more precise butslower while the process of FIG. 15 may be less precise but faster. Sodepending on precision/speed preference of the designer, the selectionbetween FIGS. 14 and 15 may be made accordingly.

It will be appreciated that whilst present principals have beendescribed with reference to some example embodiments, these are notintended to be limiting, and that various alternative arrangements maybe used to implement the subject matter claimed herein.

What is claimed is:
 1. A computer readable medium that is not a transitory signal and that comprises instructions executable by at least one processor for: receiving a signal indicating magnetic field strength during at least one complete revolution of a magnetic field; summing plural values indicated by the signals over the at least one revolution to render a sum; determining a mean of the sum; subtracting the mean of the sum from at least one magnetic field value during at least one complete revolution of the magnetic field to render an adjusted value; based on the adjusted value, determining a distance; using the adjusted value, determining at least a first angle; converting the distance and the at least first angle to coordinates; and using the coordinates to determine at least one aspect of a pose of an object coupled to a source of the magnetic field.
 2. The computer readable medium of claim 1, wherein the instructions are executable for: based on the distance and the first angle, determining a second angle; and converting the distance, the first angle, and the second angle to Cartesian coordinates.
 3. The computer readable medium of claim 1, wherein the instructions are executable for: inputting the at least one aspect of the pose of the object to a computer program.
 4. The computer readable medium of claim 3, wherein the computer program is a computer game.
 5. The computer readable medium of claim 2, wherein the instructions are executable for: using the coordinates, the mean of the sum, and the Earth's gravity vector, determining the at least one aspect of the pose of the object.
 6. The computer readable medium of claim 5, wherein the instructions are executable for using the coordinates, the mean of the sum, and the Earth's gravity vector to determine the at least one aspect of the pose of the object at least in part by: a) determining a first auxiliary vector by obtaining a cross product of the Earth's magnetic field and the Earth's gravity vector; b) determining a second auxiliary vector by obtaining a cross product of the gravity vector and the first auxiliary vector; c) constructing a matrix at least in part using the first and second auxiliary vectors and the gravity vector; and d) using the matrix to convert the aspect of pose information from a first reference frame to the Earth's reference frame.
 7. The computer readable medium of claim 6, wherein the instructions are executable for: normalizing the gravity vector and first and second auxiliary vectors before constructing the matrix.
 8. The computer readable medium of claim 1, comprising the at least one processor and the object.
 9. The computer readable medium claim 1, wherein the source of the magnetic field includes a spinning magnet.
 10. The computer readable medium claim 1, wherein the source of the magnetic field includes a least one stationary electro-permanent magnet.
 11. A computer storage that is not a transitory signal and that comprises instructions executable by at least one processor for: receiving, from at least one sensor, plural magnetic field signals induced by a spinning magnetic field, the plural magnetic field signals being from a complete rotation of the magnetic field; determining a distance to a source of the magnetic field based on at least one of the plural magnetic field signals; determining first and second angles based on at least one of the plural magnetic field signals, at least the first angle being determined at least in part by subtracting a representation of a sum of values represented by the plural magnetic field signals from at least one of the values; and deriving an orientation of the sensor based on the distance and the first and second angles.
 12. The computer storage of claim 11, wherein the first angle represents an orientation of the sensor relative to an axis of rotation of the magnetic field.
 13. The computer storage of claim 11, wherein the second angle represents a phase around an axis of rotation of the magnetic field.
 14. The computer storage of claim 11, wherein the source of the magnetic field and the sensor are coupled to a headset.
 15. The computer storage of claim 11, wherein the source of the magnetic field and the sensor are coupled to a computer game controller.
 16. The computer storage of claim 11, wherein the instructions are executable for: converting the distance, the first angle, and the second angle to Cartesian coordinates.
 17. The computer storage of claim 16, wherein the instructions are executable for: using the Cartesian coordinates, a mean of a sum of the plural magnetic field signals, and the Earth's gravity vector, determining at least one aspect of a pose of an object coupled to the source of the magnetic field.
 18. The computer storage of claim 16, wherein the instructions are executable for: inputting the at least one aspect to a computer program.
 19. A computer device comprising: at least one source of a spinning magnetic field; at least one sensor configured for sensing the magnetic field while it is spinning, the sensor configured for providing input to at least one processor configured for executing instructions to: receive, from the at least one sensor, plural magnetic field signals, the plural magnetic field signals being from a complete rotation of the magnetic field; determine a distance to the source of the magnetic field based on at least one of the plural magnetic field signals; determine first and second angles based on at least one of the plural magnetic field signals; derive an orientation of the sensor based on the distance and the first and second angles; determining a first auxiliary vector by obtaining a cross product of the Earth's magnetic field and the Earth's gravity vector; determining a second auxiliary vector by obtaining a cross product of the gravity vector and the first auxiliary vector; and using the first and second auxiliary vectors and the gravity vector to convert pose information associated with the orientation of the sensor from a first reference frame to the Earth's reference frame.
 20. The computer device of claim 19, wherein the instructions are executable to: convert the distance, the first angle, and the second angle to coordinates; use the coordinates and the Earth's gravity vector to determine at least one aspect of a pose of the game device; and input the at least one aspect to a computer program. 